/**
 * 
 */
package com.sci.web.action.systemmanage;

import java.util.List;

import javax.annotation.Resource;

import com.sci.web.action.util.BaseAction;
import com.sci.web.bean.Options;
import com.sci.web.dao.SystemManageDao;

/**
 * @author  BaiFuyou
 * @date: Nov 11, 2011 10:07:07 PM
 */
public class GetSystemSetAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8997242569992117656L;
	@Resource
	private SystemManageDao systemManageDao;
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		super.setContentType(super.JSON);
		List<Options> list = systemManageDao.getOneOptions();
		if(list == null){
			super.outPrint(super.getJSONObjectString(new Options()));
		}else{
			String json = super.getJSONObjectString(list.get(0));
			super.outPrint(json);
		}
		return "json";
	}

}
